home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / DNIX.txt < prev    next >
Text File  |  2000-04-25  |  2KB  |  73 lines

  1. !==
  2. !== DNIX.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4. DNIX has a problem with seteuid() and setegid(). These routines are
  5. needed for Samba to work correctly, but they were left out of the DNIX
  6. C library for some reason.
  7.  
  8. For this reason Samba by default defines the macro NO_EID in the DNIX
  9. section of includes.h. This works around the problem in a limited way,
  10. but it is far from ideal, some things still won't work right.
  11.  
  12. To fix the problem properly you need to assemble the following two
  13. functions and then either add them to your C library or link them into
  14. Samba.
  15.  
  16. put this in the file setegid.s:
  17.  
  18.         .globl  _setegid
  19. _setegid:
  20.         moveq   #47,d0
  21.         movl    #100,a0
  22.         moveq   #1,d1
  23.         movl    4(sp),a1
  24.         trap    #9
  25.         bccs    1$
  26.         jmp     cerror
  27. 1$:
  28.         clrl    d0
  29.         rts
  30.  
  31.  
  32. put this in the file seteuid.s:
  33.  
  34.         .globl  _seteuid
  35. _seteuid:
  36.         moveq   #47,d0
  37.         movl    #100,a0
  38.         moveq   #0,d1
  39.         movl    4(sp),a1
  40.         trap    #9
  41.         bccs    1$
  42.         jmp     cerror
  43. 1$:
  44.         clrl    d0
  45.         rts
  46.  
  47. after creating the above files you then assemble them using
  48.  
  49. as seteuid.s
  50. as setegid.s
  51.  
  52. that should produce the files seteuid.o and setegid.o
  53.  
  54. then you need to add these to the LIBSM line in the DNIX section of
  55. the Samba Makefile. Your LIBSM line will then look something like this:
  56.  
  57. LIBSM = setegid.o seteuid.o -ln
  58.  
  59. You should then remove the line:
  60.  
  61. #define NO_EID
  62.  
  63. from the DNIX section of includes.h
  64.  
  65. Then recompile and try it out!
  66.  
  67. Note that this file was derived from an email from Peter Olsson
  68. <pol@leissner.se>. I don't have DNIX myself, so you're probably better
  69. off contacting Peter if you have problems.
  70.  
  71. Andrew
  72.  
  73.